<!DOCTYPE html>
<html>
  <head>
    <title>Cathode Retro Docs</title>
    <link href="../../docs.css" rel="stylesheet">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" charset="UTF-8">
    <script src="../../main-scripts.js"></script>
  </head>
  <body onload="OnLoad()" class="page">
    <header class="header"><button id="sidebar-button"></button></header>
    <div id="sidebar-container" class="sidebar-container"><iframe class="sidebar-frame" src="../../sidebar.html?page=shader-reference-util-downsample-2x"></iframe></div>
    <div id="content-outer" class="content-outer">
      <main>
        <h1>util-downsample-2x</h1>
        <p>Downsample an input image by 2x along a given axis by using a lanczos filter.</p>
        <h2>Index</h2>
        <div class="index">
          <h3>Input Textures/Samplers</h3>
          <nav>
            <menu>
              <li><a href="#g_sourceTexture">g_sourceTexture</a></li>
              <li><a href="#g_sampler">g_sampler</a></li>
            </menu>
          </nav>
          <h3>Uniform Buffer Values</h3>
          <nav>
            <menu>
              <li><a href="#g_filterDir">g_filterDir</a></li>
            </menu>
          </nav>
        </div>
        <h2>Input Textures/Samplers</h2>
        <dl class="member-list">
          <dt id="g_sourceTexture">g_sourceTexture</dt>
          <dd>
            <div class="code-definition syntax-hlsl">
              <pre>
                g_sourceTexture
              </pre>
            </div>
            <h5>Type</h5>
            <section>
              <code>texture</code> (platform-specific)
            </section>
            <h5>Description</h5>
            <section>
              The texture to sample.
            </section>
          </dd>
          <dt id="g_sampler">g_sampler</dt>
          <dd>
            <div class="code-definition syntax-hlsl">
              <pre>
                g_sampler
              </pre>
            </div>
            <h5>Type</h5>
            <section>
              <code>sampler</code> (platform-specific, does not exist on some platforms)
            </section>
            <h5>Description</h5>
            <section>
              The sampler to use to sample <a href="#g_sourceTexture">g_sourceTexture</a>.
            </section>
          </dd>
        </dl>
        <h2>Uniform Buffer Values</h2>
        <dl class="member-list">
          <dt id="g_filterDir">g_filterDir</dt>
          <dd>
            <div class="code-definition syntax-hlsl">
              <pre>
                float2 g_filterDir
              </pre>
            </div>
            <h5>Type</h5>
            <section>
              <code>float2</code>
            </section>
            <h5>Description</h5>
            <section>
              The direction that we're downsampling along. 
              Should either be <code>(1, 0)</code> to downsample horizontally to a half-width texture or
              <code>(0, 1)</code> to downsample vertically to a half-height texture.
            </section>
          </dd>
        </dl>
      </main>
    </div>
  </body>
</html>